<template>
    <div class="recommend-detail">
      <div class="title">评论区</div>
      <ul class="recommend-item">
        <li class="detail" v-for="item in ratings">
          <img class="personal-pic" :src="item.avatar" alt=""/>
          <div style="flex: 1">
            <p class="name">{{item.username}} <span class="time">{{item.rateTime | formatTime('yyyy-MM-dd hh:mm:ss')}}</span></p>
            <ul class="score">
              <li>
                <p class="left">商家服务:</p>
                <p class="right">{{item.score}}分</p>
              </li>
              <li v-show="item.deliveryTime">
                <p class="left">配送时间:</p>
                <p class="right">{{item.deliveryTime}}分钟 </p>
              </li>
            </ul>
            <ul class="content">
              <li class="content-detail" v-for="cont in item.recommend"><span>{{cont}}:</span><span>分量足</span></li>
            </ul>
          </div>
        </li>
      </ul>
    </div>
</template>

<script>
  export default {
        name: "recommend-item",
      props:{
          ratings: {
            type: Array,
            default: null
          }
      }
    }
</script>

<style scoped>
  .recommend-detail{
    background-color: #ffffff;
    padding-left: 20px;/*rem*/
  }
  .recommend-detail .title{
    height: 64px;/*rem*/
    line-height: 64px;/*rem*/
    font-size: 22px;/*px*/
    color: #676767;
    border-bottom: 1px solid #f5f5f5;
  }
  .recommend-detail .recommend-item{
    padding-bottom: 90px;/*rem*/
  }
  .recommend-detail .recommend-item .detail{
    display: flex;
    padding: 24px 0;/*rem*/
    border-bottom: 1px solid #f6f6f6;
  }
  .recommend-detail .recommend-item .detail .personal-pic {
    height: 60px;/*rem*/
    width: 60px;/*rem*/
    border-radius: 50%;
    margin-right: 14px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .name{
    font-size: 22px;/*px*/
    color: #333333;
  }
  .recommend-detail .recommend-item .detail .name .time{
    font-size: 16px;/*px*/
    color: #a2a2a2;
    margin-left: 20px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .score{
    display: flex;
    font-size: 20px;/*px*/
    margin-top: 5px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .score li{
    display: flex;
    margin-right: 10px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .score li:after{
    content: "";
    height: 100%;
    border-right: 1px solid #f3f3f3;
  }
  .recommend-detail .recommend-item .detail .score li:last-child:after{
    content: "";
    border: none;
  }
  .recommend-detail .recommend-item .detail .score .left{
    color: #929292;
  }
  .recommend-detail .recommend-item .detail .score .right{
    color: #f6c26f;
    margin: 0 12px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .content{
    margin-top: 30px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .content .content-detail{
    font-size: 22px;/*px*/
    margin-top: 10px;/*rem*/
  }
  .recommend-detail .recommend-item .detail .content .content-detail span:first-child{
    color: #428bc9;
    margin-right: 10px;/*rem*/
  }

</style>
